<?php
/**
 * 首页功能
 * @author zhaorongwei
 * @date 2012-06-19
 */
class IndexController extends Controller
{
	/**
	 * 首页
	 * @return void
	 */
	public function index()
	{
		$vars = array(
			'pageTitle' => '趣游后台管理',
			);
		stemplate('index', $vars);
	}
	
	/**
	 * 欢迎页
	 * @return void
	 */
	public function welcome()
	{
		$vars = array(
			'pageTitle' => '欢迎使用趣游后台',
			);
		template('index/welcome',$vars);
	}
		
	/**
	 * 设置菜单
	 * @return void
	 */
	public function menu()
	{
		$vars = array(
			'pageTitle' => '菜单',
			);
		$userModel = $this->loadModel('user');
		$userInfo = $userModel->getUserInfo(loginInfo('uid'));
		
		$authModel = $this->loadModel('auth');
		$vars['menu_ui'] = treeMenu(formatTreeData($authModel->authFunctionList($userInfo['ffunctionids'])));
		template('common/menu', $vars);
	}
	
}
